

package com.hazelcast.jet.core;

import com.hazelcast.jet.JetException;

import java.io.Serial;

/**
 * Thrown when a topology change causes a job to abort. The job
 * is aborted when a participating member leaves the cluster. If
 * auto-restart is enabled for the job, the job will be restarted
 * automatically and this exception will not be thrown to the user.
 *
 * @since Jet 3.0
 */
public class TopologyChangedException extends JetException {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * Creates the exception
     */
    public TopologyChangedException() {
    }

    /**
     * Creates the exception with a message.
     */
    public TopologyChangedException(String message) {
        super(message);
    }

    /**
     * Creates the exception with a message and a cause.
     */
    public TopologyChangedException(String message, Throwable cause) {
        super(message, cause);
    }
}
